package com.boomsecret.pattern.adapter;

import com.boomsecret.pattern.adapter.source.AdvancedMediaPlayer;
import com.boomsecret.pattern.adapter.source.Mp4Player;
import com.boomsecret.pattern.adapter.target.MediaPlayer;

/**
 * Created by wangjinliang on 2018/4/11.
 */
public class MediaAdapter implements MediaPlayer {
    private AdvancedMediaPlayer advancedMediaPlayer;

    public MediaAdapter() {
        this.advancedMediaPlayer = new Mp4Player();
    }

    @Override
    public void play(String fileName) {
        advancedMediaPlayer.playMp4(fileName);
    }
}
